package com.tencent.mm.opensdk.modelmsg;

import android.os.Bundle;
import android.util.Log;

import com.tencent.mm.opensdk.modelmsg.WXMediaMessage.IMediaObject;

public class WXVideoObject implements IMediaObject {
    private static final int LENGTH_LIMIT = 10240;
    private static final String TAG = "MicroMsg.SDK.WXVideoObject";
    public String videoLowBandUrl;
    public String videoUrl;

    public WXVideoObject() {

    }

    public boolean checkArgs() {
        int v2 = 10240;
        boolean v0 = false;
        if(this.videoUrl == null || this.videoUrl.length() == 0) {
            if(this.videoLowBandUrl != null && this.videoLowBandUrl.length() != 0) {
            }else {
                Log.e("MicroMsg.SDK.WXVideoObject", "both arguments are null");
                return false;
            }
        }
        if(this.videoUrl != null && this.videoUrl.length() > v2) {
            Log.e("MicroMsg.SDK.WXVideoObject", "checkArgs fail, videoUrl is too long");
            return v0;
        }

        if(this.videoLowBandUrl != null && this.videoLowBandUrl.length() > v2) {
            Log.e("MicroMsg.SDK.WXVideoObject", "checkArgs fail, videoLowBandUrl is too long");
            return v0;
        }

        return true;
    }

    public void serialize(Bundle arg3) {
        arg3.putString("_wxvideoobject_videoUrl", this.videoUrl);
        arg3.putString("_wxvideoobject_videoLowBandUrl", this.videoLowBandUrl);
    }

    public int type() {
        return 4;
    }

    public void unserialize(Bundle arg2) {
        this.videoUrl = arg2.getString("_wxvideoobject_videoUrl");
        this.videoLowBandUrl = arg2.getString("_wxvideoobject_videoLowBandUrl");
    }
}

